<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>WZ小说门户平台</title>

<!--    <div th:include="common/css :: css_frag"></div>-->
    <script type="text/javascript" src="js/jquery-1.9.1.js"></script>

    <style>
        * {
            margin: auto;
            padding: 0;
        }

        .center {
            text-align: center;
            margin: 0 auto;
        }

        .formCs {
            width: 454px;
            height: 42px;
            background: rgba(0, 0, 0, .2);
            padding: 15px;
            border: none;
            border-radius: 5px;
        }

        .inputCs {
            width: 342px;
            height: 42px;
            background-color: #eeeeee;
            border: none;
            border-top-left-radius: 5px;
            border-bottom-left-radius: 5px;
            font: bold 15px 'lucida sans', 'trebuchet MS', 'Tahoma';
            font-style: italic;
        }

        .buttonCs {
            /*display:inline-block;*/
            width: 112px;
            height: 42px;
            background-color: #d93c3c;
            color: #fff;
            border: none;
            border-top-right-radius: 5px;
            border-bottom-right-radius: 5px;
            position: relative;
            font-size: 16px;
            font-weight: bold;
        }


        button:before {
            content: "";
            border-width: 6px;
            border-style: solid;
            border-color: transparent #d93c3c transparent transparent;
            position: absolute;
            right: 100%;
            top: 38%;
        }

    </style>
</head>

<body>


<div style="padding: 50px 50px 10px" class="center">
    <span>
        <image th:src="@{/img/duyi.png}" height="100"></image>
    </span>
</div>


<div class="formCs">
    <form th:action="@{/book/search}">
        <input type="text" name="keyword" id="keyword" class="inputCs" placeholder="搜索">
        <button onclick="searchBooks()" type="button" class="buttonCs">搜索</button>
    </form>
</div>

</body>

<script>
    function searchBooks() {
        var keywords = $("#keyword").val();
        window.location.href = "/book/search?keyword=" + keywords;
    }
</script>
</html>